using System;
using System.Windows.Forms;

namespace WCHL {
	public static class Starter {
		public static void Main() {
			SWCharGen frmCharGen;

			//Create the form and give it control
			frmCharGen = new SWCharGen();

			Application.Run(frmCharGen);

			return;
		}
	}

	public class SWCharGen : Form {
		protected Label[] calblAttribs;
		protected TextBox[] catxtAttribs;
		protected Label[] calblBaseVals;
		protected TextBox[] catxtBaseVals;

		public SWCharGen() {
			int iCtr;

			//Create controls for base values, Name and race
			calblBaseVals = new Label[2];
			catxtBaseVals = new TextBox[2];

			calblBaseVals[0] = new Label();
			catxtBaseVals[0] = new TextBox();
			calblBaseVals[1] = new Label();
			catxtBaseVals[1] = new TextBox();

			calblBaseVals[0].Top = 3;
			calblBaseVals[0].Left = 5;
			calblBaseVals[0].Height = 18;
			calblBaseVals[0].Width = 65;
			calblBaseVals[0].Text = "Name";

			calblBaseVals[1].Top = 23;
			calblBaseVals[1].Left = 5;
			calblBaseVals[1].Height = 18;
			calblBaseVals[1].Width = 65;
			calblBaseVals[1].Text = "Race";

			catxtBaseVals[0].Top = 3;
			catxtBaseVals[0].Left = 73;
			catxtBaseVals[0].Height = 18;
			catxtBaseVals[0].Width = 60;
			catxtBaseVals[0].Text = "Chuck";

			catxtBaseVals[1].Top = 23;
			catxtBaseVals[1].Left = 73;
			catxtBaseVals[1].Height = 18;
			catxtBaseVals[1].Width = 60;
			catxtBaseVals[1].Text = "Human";

			Controls.Add(calblBaseVals[0]);
			Controls.Add(calblBaseVals[1]);
			Controls.Add(catxtBaseVals[0]);
			Controls.Add(catxtBaseVals[1]);

			//Create controls for all 5 attributes
			calblAttribs = new Label[5];
			catxtAttribs = new TextBox[5];

			for (iCtr = 0; iCtr < catxtAttribs.Length; iCtr++) {
				calblAttribs[iCtr] = new Label();
				catxtAttribs[iCtr] = new TextBox();

				calblAttribs[iCtr].Top = (iCtr * 20) + 43;
				calblAttribs[iCtr].Left = 5;
				calblAttribs[iCtr].Height = 18;
				calblAttribs[iCtr].Width = 65;

				catxtAttribs[iCtr].Top = (iCtr * 20) + 43;
				catxtAttribs[iCtr].Left = 73;
				catxtAttribs[iCtr].Height = 18;
				catxtAttribs[iCtr].Width = 30;

				Controls.Add(calblAttribs[iCtr]);
				Controls.Add(catxtAttribs[iCtr]);
			}

			calblAttribs[0].Text = "Strength";
			catxtAttribs[0].Text = "d4";

			calblAttribs[1].Text = "Dexterity";
			catxtAttribs[1].Text = "d6";

			calblAttribs[2].Text = "Intelligence";
			catxtAttribs[2].Text = "d8";

			calblAttribs[3].Text = "Spirit";
			catxtAttribs[3].Text = "d10";

			calblAttribs[4].Text = "Vigor";
			catxtAttribs[4].Text = "d12";

			//Position and configure the form
			this.Width = 775;
			this.Height = 670;
			this.FormBorderStyle = FormBorderStyle.FixedSingle;
		}
	}
}